﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JinfuyuanProject.Entity;
using JinfuyuanProject.Service.Interface;
using JinfuyuanProject.Repository.Interface;

namespace JinfuyuanProject.Service
{
   public class ProcurementsService: IProcurementsService
    {
        private readonly IProcurementsRepository _procurementsRepository;

        public ProcurementsService(IProcurementsRepository procurementsRepository)
        {
            _procurementsRepository = procurementsRepository;
        }
        public bool Delete(Procurements procurements)
        {
            return _procurementsRepository.Delete(procurements);
        }

        public IQueryable<Procurements> GetList()
        {
            return _procurementsRepository.GetList();
        }

        public Procurements GetModel(int Id)
        {
            return _procurementsRepository.GetModel(Id);
        }

        public int Insert(Procurements procurements)
        {
            return _procurementsRepository.Insert(procurements);
        }

        public bool Update(Procurements procurements)
        {
            return _procurementsRepository.Update(procurements);
        }
    }
}
